#!/bin/bash

# 复制配置文件到制定位置
dwmAutoScriptsPath=~/.dwm

if [ -d ${dwmAutoScriptsPath} ]
then
	echo "[INFO]~/.dwm is exist."
	mv ~/.dwm ~/.dwm-bak`date +%y%m%d%H%M%S`
else
	# mkdir ~/.dwm
	ls  -alh ~/.dwm
fi

# 获取当前脚本目录位置
cd `dirname $0`
dir=`pwd`
echo ${dir}

# 建立软链接命令拼接
# cmdStr="ln -s  "${dir}"/scripts "${HOME}"/.dwm"
cmdStr="ln -s  "${dir}" "${HOME}"/.dwm"
echo "执行命令: ${cmdStr} 建立软链接"
${cmdStr}